class Furniture:
    def __init__(self, name, area):
        self.name=name
        self.area=area

class House:
    def __init__(self, address, area):
        self.address =address
        self.area =area
        self.remainder_area = area
        self.furniture =[]
    def __str__(self):
        return f'房子位置：{self.address},面积: {self.area},' \
                f'剩余面积：{self.remainder_area},家具列表：{self.furniture}'
    def add_furniture(self,item):
        if self.remainder_area >=item.area:
            self.furniture.append(item)
            self.remainder_area -= item.area
        else:
            print("家具太大，放不下了！")


if __name__ =='__main__':
    my_house =House('学院路7号',158)
    bed=Furniture('床',20)
    ball=Furniture('足球场',1200)
    my_house.add_furniture(bed)
    my_house.add_furniture(ball)
    print(my_house)